calendar: do not allow to set 0 as day
authorCarlos Garcia Campos <cgarcia@igalia.com>
Fri, 7 May 2021 10:13:49 +0000 (12:13 +0200)
committerCarlos Garcia Campos <cgarcia@igalia.com>
Fri, 7 May 2021 10:13:49 +0000 (12:13 +0200)
We no longer unselect the current day when 0 is set, so update the
documentation and the property definition.

gtk/gtkcalendar.c

index cda27021b87dcb7f78cfb0de51bd4c9a672c14c0..93f1793078187da2283fe3198fef47e0ab8070ad 100644 (file)
@@ -397,16 +397,13 @@ gtk_calendar_class_init (GtkCalendarClass *class)
    * GtkCalendar:day:
    *
    * The selected day (as a number between 1 and 31).
-   *
-   * This can be set to 0 to unselect the currently selected day.
-   * This property gets initially set to the current day.
    */
   g_object_class_install_property (gobject_class,
                                    PROP_DAY,
                                    g_param_spec_int ("day",
                                                      P_("Day"),
-                                                     P_("The selected day (as a number between 1 and 31, or 0 to unselect the currently selected day)"),
-                                                     0, 31, 0,
+                                                     P_("The selected day (as a number between 1 and 31)"),
+                                                     1, 31, 1,
                                                      G_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
 
   /**